import { createStore } from 'vuex'

export default createStore({
  state: {
    // 管理员信息
    adminInfo:{},
    // 导航菜单是否缩放
    collapse:false
  },
  mutations: {
    // 更新管理员信息
    updateAdminInfo(state,adminInfo){
      state.adminInfo = adminInfo
    },
    // 退出登录
    exitAdminInfo(state){
      state.adminInfo = {}
    },
    // 改变导航菜单
    updateCollapse(state){
      state.collapse = !state.collapse
    }
  },
  actions: {
  },
  modules: {
  }
})
